Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unintended cancellation of fetcher task #1007

Merged
merged 2 commits into from
May 12, 2024
Merged

Conversation

apmorton
Copy link
Contributor

@apmorton apmorton commented May 9, 2024

Changes

Fixes #983

It's not entirely clear to me why the change from asyncio.wait_for to util.wait_for caused a behavior change here, but this code was always broken in the case where task.cancel() was called.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

@apmorton apmorton marked this pull request as ready for review May 9, 2024 06:43
@apmorton apmorton changed the title Fix unintented cancellation of fetcher task Fix unintended cancellation of fetcher task May 9, 2024
aiokafka/consumer/fetcher.py Outdated Show resolved Hide resolved
Co-authored-by: Denis Otkidach <denis.otkidach@gmail.com>
Copy link

codecov bot commented May 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.04%. Comparing base (c759664) to head (4c40f19).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1007   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         114      114           
  Lines       16917    16918    +1     
  Branches     2757     2758    +1     
=======================================
+ Hits        16079    16080    +1     
  Misses        493      493           
  Partials      345      345           
Flag Coverage Δ
cext 91.96% <100.00%> (+<0.01%) ⬆️
integration 94.69% <100.00%> (+<0.01%) ⬆️
purepy 94.52% <100.00%> (+<0.01%) ⬆️
unit 52.77% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ods ods merged commit 79c9bf5 into aio-libs:master May 12, 2024
31 checks passed
@apmorton apmorton deleted the am/fix-983 branch August 21, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consumer stopped consuming, task Fetcher._fetch_task has finished
2 participants